<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
	<form action="" method="post" enctype="multipart/form-data">
		<div class="alert alert-success">添加友链</div>
		<div class="form-group">
			<label for="exampleInputEmail1">名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" required="" name="lname" value="<?php echo $linkData['lname']?>">
		</div>
		
	<!-- 	<div class="form-group">
			<label for="exampleInputEmail1">logo</label>
			<input id="exampleInputEmail1" class="form-control" type="file" name="logo">
		</div> -->

		<div class="form-group">
			<label for="exampleInputEmail1">logo</label>
			<script src="<?php echo __PUBLIC__?>/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
			<script type="text/javascript">
				$(function(){
					$('#close_img').click(function(){
						$('.img_box').remove();
						$('.files_box').html('<input type="file" name="thumb" id="thumb" value="" />');
					})
					
				})
			</script>
			
			
			<?php if(isset($linkData['logo']) && $linkData['logo']!=''){?>
                
			<div class="img_box">
				<img src="<?php echo __ROOT__?>/<?php echo $linkData['logo']?>" alt="" width="200" />
				<a href="javascript:;" id="close_img">X</a>
				<input type="hidden" name="logo" id="exampleInputEmail1" value="<?php echo $linkData['logo']?>" />
			</div>
			<?php }else{?>
			<input id="exampleInputEmail1" type="file" required="" name="logo">
			
               <?php }?>
			<div class="files_box"></div>
		</div>


		<div class="form-group">
			<label for="exampleInputEmail1">url地址</label>
			<input id="exampleInputEmail1" class="form-control" type="text" required="" name="url" value="<?php echo $linkData['url']?>">
		</div>
		
		<div class="form-group">
			<label for="exampleInputEmail1">排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" required="" name="sort" value="<?php echo $linkData['sort']?>">
		</div>
		
		<input type="hidden" name="lid" value="<?php echo $linkData['lid']?>">
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		<input type='hidden' name='__TOKEN__' value='0e5e8efc1808a0839fe9eb72465d5d5f'</form>
	</body>
</html>
